package item;

import graphics.DebugDrawable;

import java.awt.Graphics;
import java.util.ArrayList;

import utils.Vector2d;

import bots.BotManager;

public class ItemManager implements DebugDrawable {
	BotManager botman;
	
	ArrayList<IItem> itemList;
	
	public ItemManager() {
		itemList = new ArrayList<IItem>();
	}
	
	public void createBotSpawn(Vector2d coords, int team) {
		//beletteList.add(new HeartBelette(this, botman, surface, firedBy, startCoords, velocity));
	}
	
	public void addItem(IItem item) {
		itemList.add(item);
	}
	
	public void setBotManager(BotManager botman) {
		this.botman = botman;
	}
	
	public void removeItem(IItem item) {
		itemList.remove(item);
	}
	
	public void computeNextFrame() {
		for(IItem item : itemList) {
			item.computeNextFrame();
		}
	}
	
	public void drawAllOn(Graphics g) {
		for(IItem item : itemList) {
			item.draw(g);
		}
	}

	public void drawDebug(Graphics g) {
		for(IItem item : itemList) {
			item.drawDebug(g);
		}
	}
}
